package com.jiezheng.huinong.action;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.jiezheng.huinong.dao.CommonInfoDAOImpl;
import com.opensymphony.xwork2.ActionSupport;

public class CommonInfoAction extends ActionSupport {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = -2677429137726084108L;
	
	private String level = "0";
	private String parent = "";
	private List<HashMap<String, String>> infos = new ArrayList<HashMap<String, String>>();

	/**
	 * 列出所有指标文号
	 * 
	 * @return
	 */
	public String listIndexNo() {
		return SUCCESS;
	}

	/**
	 * 列出所有预算单位
	 * 
	 * @return
	 */
	public String listBudgetUnit() {
		infos = (new CommonInfoDAOImpl()).listBudgetUnitMap(level, parent);
		return SUCCESS;
	}
	
	/**
	 * 列出所有实拨单位
	 * 
	 * @return
	 */
	public String listShiBoUnit() {
		infos = (new CommonInfoDAOImpl()).listShiBoUnitMap(level, parent);
		return SUCCESS;
	}

	/**
	 * 列出所有预算项目
	 * 
	 * @return
	 */
	public String listBudgetItem() {
		infos = (new CommonInfoDAOImpl()).listBudgetItemMap();
		return SUCCESS;
	}

	/**
	 * 列出所有指标来源
	 * 
	 * @return
	 */
	public String listIndexSource() {
		infos = (new CommonInfoDAOImpl()).listIndexSourceMap(level, parent);
		return SUCCESS;
	}

	/**
	 * 列出所有指标类型
	 * 
	 * @return
	 */
	public String listIndexType() {
		infos = (new CommonInfoDAOImpl()).listIndexTypeMap(level, parent);
		return SUCCESS;
	}

	/**
	 * 列出所有预算单位
	 * 
	 * @return
	 */
	public String listFundProp() {

		infos = (new CommonInfoDAOImpl()).listFundPropMap(level, parent);
		return SUCCESS;
	}

	/**
	 * 列出所有支付方式
	 * 
	 * @return
	 */
	public String listPayMethod() {

		infos = (new CommonInfoDAOImpl()).listPayMethodMap();
		return SUCCESS;
	}

	/**
	 * 列出所有功能分类
	 * 
	 * @return
	 */
	public String listFuncType() {

		infos = (new CommonInfoDAOImpl()).listFuncTypeMap(level, parent);
		return SUCCESS;
	}

	/**
	 * 列出所有经济分类
	 * 
	 * @return
	 */
	public String listFinancialType() {

		infos = (new CommonInfoDAOImpl()).listFinancialTypeMap(level, parent);
		return SUCCESS;
	}
	
	/**
	 * 列出所有结算方式
	 * 
	 * @return
	 */
	public String listSettleMethod() {

		infos = (new CommonInfoDAOImpl()).listSettleMethodMap(level, parent);
		return SUCCESS;
	}
	
	/**
	 * 列出所有预算分类
	 * 
	 * @return
	 */
	public String listBudgetType() {

		infos = (new CommonInfoDAOImpl()).listBudgetTypeMap(level, parent);
		return SUCCESS;
	}
	
	/**
	 * 列出所有股室部门
	 * 
	 * @return
	 */
	public String listDept() {

		infos = (new CommonInfoDAOImpl()).listDeptMap();
		return SUCCESS;
	}
	
	/**
	 * 列出所有股室部门
	 * 
	 * @return
	 */
	public String listDeptBank() {

		infos = (new CommonInfoDAOImpl()).listDeptBankMap();
		return SUCCESS;
	}
	
	
	/**
	 * 列出所有岗位
	 * 
	 * @return
	 */
	public String listPost() {

		infos = (new CommonInfoDAOImpl()).listPostMap(parent);
		return SUCCESS;
	}

	public List<HashMap<String, String>> getInfos() {
		return infos;
	}

	public void setInfos(List<HashMap<String, String>> infos) {
		this.infos = infos;
	}

	public String getParent() {
		return parent;
	}

	public void setParent(String parent) {
		this.parent = parent;
	}

	public void setLevel(String level) {
		this.level = level;
	}

}
